<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <input type="text" value="123">
</body>
</html>

<script>
// 
var x = +prompt('请输入第一个数字');

// 一定要 考虑 极端情况/边界情况
if (isNaN(x)) {
  alert('你输入的不是数字');
}

var y = +prompt('请输入第二个数字');

console.log(x, y);

alert(x + y);


</script>